
CXXFLAGS += -Wall
LDFLAGS += $(shell gsl-config --libs)

#LDFLAGS += -lgmp

#CXXFLAGS += -g
#LDFLAGS += -g

CXXFLAGS += -O3 -fomit-frame-pointer

all: hprim printh testh printz

hprim: hprim.o
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS)

printh: printh.o
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS)

testh: testh.o
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS)

printz: printz.o
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS)

clean:
	rm -f *.o hprim printh testh printz

distclean: clean
	rm -f *.csv fit.log .depend

depend:
	$(CXX) -M *.cpp > .depend

-include .depend
